package cn.jzq.kotoba.modules.designpattern.factory;

/**
 * @author jzq
 * @date 2018/12/27 15:49
 */
public class SimplePizzaFactory {

    public Pizza createPizza(String type) {
        Pizza pizza = null;
        if ("cheese".equals(type)) {
            pizza = new CheesePizza();
        } else if ("pepperoni".equals(type)) {
            pizza = new PepperoniPizza();
        }
        return pizza;

    }
}
